﻿using System;
using System.Windows.Data;

namespace RLProject1.ViewModel.Helper {
    /// <summary>
    /// Konvertiert Double zu String
    /// </summary>
    [ValueConversion(typeof(double), typeof(String))]
    class DoubleToStringConverter : IValueConverter {

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
            return value.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
            return Double.Parse(value.ToString());
        }

        #endregion
    }

}
